[WC-3501]: fix(combobox-web): fix inverted editability logic#2332
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
r0b1n
force-pushed
the
fix/combobox-editability-inverted
branch
from
July 16, 2026 13:02
aecac76 to
2351483
Compare
This comment has been minimized.
This comment has been minimized.
r0b1n
force-pushed
the
fix/combobox-editability-inverted
branch
from
July 17, 2026 10:42
2351483 to
86b58b8
Compare
This comment has been minimized.
This comment has been minimized.
leonardomendix
previously approved these changes
Jul 21, 2026
r0b1n
force-pushed
the
fix/combobox-editability-inverted
branch
from
July 23, 2026 09:23
86b58b8 to
cb1af7a
Compare
The `conditionally` branch returned `expression.value` directly, so a truthy value (meaning "editable") made the widget read-only, and vice versa. Fixed by returning `true` only when the expression is not `true`, and added unit tests for all `getReadonly` branches.
r0b1n
force-pushed
the
fix/combobox-editability-inverted
branch
from
July 23, 2026 13:19
cb1af7a to
4940308
Compare
leonardomendix
approved these changes
Jul 23, 2026
yordan-st
approved these changes
Jul 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
getReadonly()where theconditionallyeditability mode had inverted logic:expression.value = true(meaning "editable") was being returned directly as the read-only flag, making the widget read-only when it should be editable, and vice versa.targetAttributecaused the function to return early withfalse(editable), bypassing the custom editability condition entirely. NowtargetAttributeonly short-circuits when it is explicitly read-only.getReadonly.Root cause
Two issues in
getReadonly:targetAttributepresence meant any editable attribute would always report the widget as editable, ignoring theneverorconditionallysettings.conditionallybranch returnedcustomEditabilityExpression.value ?? truedirectly, where the expression represents editability (true = editable), so the boolean was inverted.